Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing circular symlinks (issue 513) #390

Merged
merged 26 commits into from
May 23, 2023

Conversation

przadka
Copy link
Contributor

@przadka przadka commented Apr 27, 2023

Capped symlinks visits while scanning
New tests added
Added pytest-timeout to test requirements

@przadka przadka force-pushed the circular-links branch 8 times, most recently from 67e4246 to acdc5e9 Compare May 1, 2023 05:05
@przadka
Copy link
Contributor Author

przadka commented May 1, 2023

@ppolewicz After some additional time debugging symlinks on Windows this PR is ready for review. Some tests are skipped on Windows with PyPy, because PyPy do not support symlinks on Windows. I did a self-review before writing this comment. There are still some minor FIXMEs and I would appreciate some feedback on them.

CHANGELOG.md Outdated Show resolved Hide resolved
b2sdk/scan/folder.py Outdated Show resolved Hide resolved
b2sdk/scan/folder.py Outdated Show resolved Hide resolved
b2sdk/scan/folder.py Outdated Show resolved Hide resolved
b2sdk/scan/folder.py Outdated Show resolved Hide resolved
test/unit/scan/test_scan_policies.py Outdated Show resolved Hide resolved
test/unit/scan/test_scan_policies.py Outdated Show resolved Hide resolved
test/unit/scan/test_scan_policies.py Outdated Show resolved Hide resolved
test/unit/scan/test_scan_policies.py Outdated Show resolved Hide resolved
test/unit/scan/test_scan_policies.py Outdated Show resolved Hide resolved
Capped symlinks visits while scanning
New tests added
Added pytest-timeout to test requirements
Changelog updated
Circular loops are not detected as soon as we visit the same path twice
Improved docstring for _walk_relative_paths
No longer secretly skipping symlinks pointing to parent of scan directory
Added warning msg when circular symlinks found
Set of visited symlinks now stores inode integers rather than full paths
b2sdk/scan/folder.py Outdated Show resolved Hide resolved
b2sdk/scan/folder.py Outdated Show resolved Hide resolved
b2sdk/scan/report.py Outdated Show resolved Hide resolved
b2sdk/scan/report.py Outdated Show resolved Hide resolved
b2sdk/scan/report.py Outdated Show resolved Hide resolved
test/unit/scan/test_folder_traversal.py Outdated Show resolved Hide resolved
przadka and others added 2 commits May 10, 2023 11:51
b2sdk/scan/folder.py Outdated Show resolved Hide resolved
b2sdk/scan/folder.py Outdated Show resolved Hide resolved
b2sdk/scan/folder.py Outdated Show resolved Hide resolved
test/unit/scan/test_folder_traversal.py Outdated Show resolved Hide resolved
test/unit/scan/test_folder_traversal.py Outdated Show resolved Hide resolved
test/unit/scan/test_folder_traversal.py Outdated Show resolved Hide resolved
test/unit/scan/test_scan_policies.py Show resolved Hide resolved
test/unit/scan/test_folder_traversal.py Show resolved Hide resolved
przadka and others added 6 commits May 15, 2023 06:09
…ist comprehension to reduce memory usage

Co-authored-by: Paweł Polewicz <p.polewicz@gmail.com>
Co-authored-by: Paweł Polewicz <p.polewicz@gmail.com>
Co-authored-by: Paweł Polewicz <p.polewicz@gmail.com>
@ppolewicz ppolewicz merged commit 3fd20f1 into Backblaze:master May 23, 2023
21 checks passed
@ppolewicz ppolewicz deleted the circular-links branch May 23, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants